window.onload=function(){
	var loveBzk = 1;
	var czlist  = numlist.getElementsByTagName("em");
	zeai.listEach(czlist,function(obj){
		if (obj.hasClass('ed')){priceInit(obj);}
		obj.onclick=function(){priceInit(obj);cleardom(obj);}
	});
	function priceInit(obj){
		var rmb=obj.getAttribute("rmb");
		var endrmb=rmb*loveBzk;
		endrmb=returnFloat(endrmb);
		o('money').value = endrmb;
		o('objid').value = objid=obj.getAttribute("objid");
		//price.html(endrmb+'元');
	}
	function cleardom(curdom){
		zeai.listEach(czlist,function(obj){obj.removeClass('ed');});
		curdom.addClass('ed');
	}
	nextbtn.onclick=function(){
		if (o('money').value==0){
			zeai.ajax({url:'my_top'+zeai.extname,js:1,data:{submitok:'ajax_top_free',objid:o('objid').value}},function (e){var rs=zeai.jsoneval(e);
				zeai.msg(rs.msg);
				if (rs.flag==1)setTimeout(function(){zeai.openurl(HOST);},1000);
			});
		}else{
			money=o('money').value;o('money_str').html(money+'元');
			ZeaiM.div_up({obj:czbox,h:winh});
		}
	}
	function returnFloat(value){
		var value=Math.round(parseFloat(value)*100)/100;
		var xsd=value.toString().split(".");
		return value;
	}
}